<template>
  <div
    class="card-box d-flex flex-column ai-center jc-start"
    :class="cardData.isSelect ? 'active' : ''"
  >
    <div class="img-box d-flex jc-center ai-center">
      <MyImage :src="cardData.snap_path" alt width="140px" :height="height" :type="type"/>
    </div>
    <div class="info mt-10 mb-10">{{ cardData.trigger || cardData.trigger_time }}</div>
  </div>
</template>

<script>
export default {
  props: {
    type:{
      type:String,
      default:'face'
    },
    cardData: {
      type: Object,
      default: () => ({}),
    },
  },
  computed: {
    height() {
      return ['body'].includes(this.type) ? '200px' : '140px';
    },
  },
};
</script>

<style lang="less" scoped>
.card-box {
  width: 142px;
  height: 220px;
  .img-box {
    background-color: rgba(242, 250, 255, 1);
    border-radius: 8px;
    height: 200px;
    border: 1px solid rgba(230, 237, 242, 1);
    width: 140px;
  }
  &.active {
    border: 1px solid #09c7aa;
  }
}
</style>
